package com.itheime.array;

import java.util.Scanner;

public class ArrayDemo1 {
    public static void main(String[] args) {
        int[] arr = {3, 4, 15, 2, 3};
        int max = getMax(arr);
        System.out.println(max);
    }
   public static int getMax(int[] arr){
       int max = arr[0];
           for (int i = 1; i < arr.length; i++) {
               if (max < arr[i]) {
                   max = arr[i];
               }
           }
       Scanner sc=new Scanner(System.in);
       return max;
   }

}
